<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>test - mytb</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
            
       <script src="../jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"> </script>
       <script src="rightClick.js" type="text/javascript" charset="utf-8"> </script>
        <style type="text/css">
            *{
                margin:0;
                padding:0;
            }
            .adddrug{
                width: 500px;
                margin: 0px auto;
            }
            .msg{
                font-size: 12px;
                color:#B94A48;
            }
        </style>
        <script type="text/javascript">
            
            $(function(){
                document.getElementById("test").oncontextmenu= function(){
                  return false;
                };
                
                $("#r").rightClick(function(){alert(event.type);});
                $(".contextMenu").rightClick(function(){alert(event.button);});
                $("#btn").rightClick(function(){alert(event.button);});
                
            });
        </script>
    </head>
    <body>
<br />
<br />
 <div id="test"> here click right mouse </div>
 <br />
<br />
 <div id="r"> here click right mouse </div>
  <br />
<br />
<button id="btn">anniu</button>
 <div class="contextMenu">hhhhhhhhhhhh</div>
 
 
   <br />
<br />

    </body>
</html>
